package com.juyu.miliao.scheduler.dao.mysql;


import com.juyu.miliao.common.dataSource.tool.operate.Operate;
import com.juyu.miliao.scheduler.domin.Label;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class LabelDao {
    @Resource
    private SqlSession sqlSession;

    public List<Label> getLabelList() {
        return sqlSession.selectList("getLabelList");
    }

    @Operate("strategy('byUserId', #userId)")
    public List<Label> getUserMeLabelByUserId(Long userId){
        return sqlSession.selectList("getUserMeLabelByUserId", userId);
    }

}
